-- GENERATED SPELL FOR [Highlord Mastrogonde] --


function spell0_8282(pUnit, Event) --@Polymorph,n/a--
pUnit:FullCastSpellOnTarget(13323,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8282', 9500, 1)
end

function spell1_8282(pUnit, Event) --@Power Word: Shield,n/a--
pUnit:FullCastSpellOnTarget(11974,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8282', 30297, 1)
end

function spell2_8282(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(9613,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8282', 3000, 1)
end

function spell3_8282(pUnit, Event) --@Shadow Word: Pain,n/a--
pUnit:FullCastSpellOnTarget(11639,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_8282', 18000, 1)
end

function Sorts_8282(pUnit, Event)
local choix_sorts_8282 = math.random(0, 3)
if choix_sorts_8282 == 0 then
pUnit:RegisterEvent('spell0_8282', 1, 1)
end
if choix_sorts_8282 == 1 then
pUnit:RegisterEvent('spell1_8282', 1, 1)
end
if choix_sorts_8282 == 2 then
pUnit:RegisterEvent('spell2_8282', 1, 1)
end
if choix_sorts_8282 == 3 then
pUnit:RegisterEvent('spell3_8282', 1, 1)
end
end

function mob8282_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_8282', math.random(1500, 3000), 1)
end

function mob8282_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8282_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob8282_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(8282, 1, 'mob8282_Action')
RegisterUnitEvent(8282, 2, 'mob8282_Leave')
RegisterUnitEvent(8282, 3, 'mob8282_Kill')
RegisterUnitEvent(8282, 4, 'mob8282_Die')
